package com.nmf.dao.gen;

import com.nmf.dao.gen.bean.BizGonggao;
import com.nmf.dao.gen.bean.BizGonggaoExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface BizGonggaoMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_gonggao
     */
    @SelectProvider(type=BizGonggaoSqlProvider.class, method="countByExample")
    long countByExample(BizGonggaoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_gonggao
     */
    @DeleteProvider(type=BizGonggaoSqlProvider.class, method="deleteByExample")
    int deleteByExample(BizGonggaoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_gonggao
     */
    @Delete({
        "delete from biz_gonggao",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_gonggao
     */
    @Insert({
        "insert into biz_gonggao (id, title, ",
        "content, url, ",
        "status, create_date, ",
        "update_date)",
        "values (#{id,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, ",
        "#{content,jdbcType=LONGVARCHAR}, #{url,jdbcType=VARCHAR}, ",
        "#{status,jdbcType=SMALLINT}, #{createDate,jdbcType=TIMESTAMP}, ",
        "#{updateDate,jdbcType=TIMESTAMP})"
    })
    int insert(BizGonggao record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_gonggao
     */
    @InsertProvider(type=BizGonggaoSqlProvider.class, method="insertSelective")
    int insertSelective(BizGonggao record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_gonggao
     */
    @SelectProvider(type=BizGonggaoSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),
        @Result(column="content", property="content", jdbcType=JdbcType.LONGVARCHAR),
        @Result(column="url", property="url", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.SMALLINT),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP)
    })
    List<BizGonggao> selectByExample(BizGonggaoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_gonggao
     */
    @Select({
        "select",
        "id, title, content, url, status, create_date, update_date",
        "from biz_gonggao",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),
        @Result(column="content", property="content", jdbcType=JdbcType.LONGVARCHAR),
        @Result(column="url", property="url", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.SMALLINT),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP)
    })
    BizGonggao selectByPrimaryKey(String id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_gonggao
     */
    @UpdateProvider(type=BizGonggaoSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") BizGonggao record, @Param("example") BizGonggaoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_gonggao
     */
    @UpdateProvider(type=BizGonggaoSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") BizGonggao record, @Param("example") BizGonggaoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_gonggao
     */
    @UpdateProvider(type=BizGonggaoSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(BizGonggao record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_gonggao
     */
    @Update({
        "update biz_gonggao",
        "set title = #{title,jdbcType=VARCHAR},",
          "content = #{content,jdbcType=LONGVARCHAR},",
          "url = #{url,jdbcType=VARCHAR},",
          "status = #{status,jdbcType=SMALLINT},",
          "create_date = #{createDate,jdbcType=TIMESTAMP},",
          "update_date = #{updateDate,jdbcType=TIMESTAMP}",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(BizGonggao record);
}